package com.fxpc.common;

/**
 * @Author Zyl
 * @Date 2021/4/13 18:55
 * @Version 1.0
 * @Describe:
 */
public enum TaskInfoEnum {

    /**
     * 枚举类也是java类，可以声明属性、方法（构造方法只能是私有的）、可以实现接口，但是不能继承（默认继承了java.lang.Enum），也不能被继承（默认使用final修饰）
     * LOCK,NORMAL 实际是  UserStatus的单例模式，如 public static final UserStatus LOCK = new UserStatus("0","锁定状态")
     * 如果枚举不需要属性，则可以声明一个无参的构造方法，然后定义一个无属性的枚举值，如OTHER
     * 枚举类实现接口后，可以分别在每个对象中实现接口方法
     */

    /**
     * ============================风险普普查进度任务枚举类定义命名规范==================
     * EQ(earthquake):地震  质检(QUALITY):QT    上报(reported):RP
     * MFTACTV(Major fault activity):主要断层活动性
     * EQACTVFT(active fault): 地震活动断层
     * geological conditions 地质条件
     */

    EQ_SURVEY("9", "地震调查", "b5e8cb66-3744-4cf9-b512-48e67507dd8d", "88c2414a-0465-479c-bc78-59a0b514930b"),

    EQRISK_EVALUATEMAP("9-91", "地震危险性评价图", "ca8b6cea-ab4e-40e1-9483-9193717e8d57", "afaecbc4-ab41-4bfe-99d1-0c4283a037ee"),

    //qh_probability_earthquake_danger
    EQPGA_ISOLINEMAP("9-91-1", "地震动PGA等值线图", "7885494f-0610-4bbe-9c1d-d720b8369d8b", "2ec07498-84b9-4a09-a3e4-b83aa3c09f46"),

    //qh_risk_level_map_point
    EQRISK_LEVELMAP_POINT("9-91-2", "地震危险性等级图（矢量点）", "19601bf0-a482-4036-869c-e770517c1c6b", "75b9bdeb-35d6-4452-b989-ef57f4ad2ba4"),

    //qh_risk_level_map_polygon
    EQRISK_LEVELMAP_POLYGON("9-91-3", "地震危险性等级图（矢量面）", "e9d9974b-41a3-40fe-a420-82146ec3856a", "0e10727f-f7d0-4896-8ac1-19e3f4bfe03e"),


    FCLTDIST_EVALUATEMAP("9-92", "房屋建筑、市政设施隐患评估图", "bde93fc3-c327-4bd4-8cb1-da7c8e853a13", "2108d176-b29b-4028-9b90-4a065d957afa"),
    //yh_disaster 市政桥梁地震隐患评估成果图
    FW_FCLTDIST_EVALUATEMAP("9-92-1", "房屋建筑物地震隐患评估成果图", "c218a128-8efe-46cc-805d-35a6fe639239", "ba217361-de96-41f1-b26f-a29a6e8dbb8b"),
    SZ_FCLTDIST_EVALUATEMAP("9-92-2", "市政桥梁地震隐患评估成果图", "39e6e8af-41a3-4816-8e34-c7d6e93c284f", "3af61855-4362-4591-bc94-c10feff7a3bf"),
    CS_FCLTDIST_EVALUATEMAP("9-92-3", "城市自来水厂地震隐患评估成果图", "87a1522e-86d0-4f76-97ad-b8bc4a21ade6", "06e920aa-e275-4581-bc73-163550ed1b19"),

    CONTROL_DIVISION("9-93", "防治区划图", "aaa7ac84-5116-4629-8a87-a0d31fb18332", "fe5b1454-de04-4310-9a00-9dd9dc5bd46a"),
    //fxqh_priority
    EQRELIEF_REINFORCEMENT_PRIORITY("9-93-1", "抗震加固优先级", "074a5343-9d3d-4edc-8b14-2481e9e54398", "d2ff2dfc-f30a-4683-8d5e-a71b31e6f3ec"),
    //fxqh_hdc100
    HDC100_AVOID_BUFFER("9-93-2", "活动断层100m避让缓冲区", "e1a90c3a-6e55-4dcb-84d5-18bf345c0a01", "b48a4ec8-a08d-43d5-ae3a-b9961f3206c7"),
    HDC200_AVOID_BUFFER("9-93-3", "活动断层200m避让缓冲区", "79c57958-11fa-44da-8cad-f737c1d9b02d", "f920774a-00fc-4a2a-bc8b-42fd118284da"),

    NATIONAL_HDCMAP("9-94", "全国活动断层图", "f50c7afb-dc47-4db3-9362-b5ce3f5d9374", "c59c341b-96e4-477f-a301-15d19123ede2"),
    //hddc_activefault  activefault
    HDC_LINE("9-94-1", "活动断层线", "9271eb20-3864-4b4b-addb-c97066d534a1", "555307be-4544-46e4-9dfe-371ae41b6491"),
    //hddc_activefault_positionerror
    HDC_POSITIONERR("9-94-2", "活动断层位置误差", "bdda208f-d3f6-4c62-91d5-d4dd4a206c17", "ac029f23-aebb-42b1-a9db-47285d3ac70c"),

    DIRECT_ENMLOSS_RISKEVALUATE_RISKLEVEL_MAP("9-95", "直接经济损失风险评估图及等级图", "85f052bc-916b-48f5-94ee-baa3288ef5c7", "3ba0731b-8e6b-47be-936b-8f563e47fed8"),
    //fx_picture
    EQDSAT_DIRECT_ENMLOSS_EVALUATEMAP("9-95-1", "地震灾害房屋直接经济损失评估图", "c73d9539-ed76-4f14-ae4e-c9561c8dcfd8", "610ea8f7-931b-45af-b1ad-967b8da2dd71"),
    //fx_economic_loss_level_map
    ECONOMIC_LOSS_LEVELMAP0("9-95-2", "50年超越概率63%地震作用下房屋直接经济损失等级图", "741a13d5-ad79-4938-a5ef-985241e50975", "29ac7573-b2db-4465-820c-1f12701c6e02"),
    ECONOMIC_LOSS_LEVELMAP1("9-95-3", "50年超越概率10%地震作用下房屋直接经济损失等级图", "ea0e36e3-11fc-4c53-9048-43e90959e387", "100e9202-8715-4f4d-9e90-7aed3ce27b9f"),
    ECONOMIC_LOSS_LEVELMAP2("9-95-4", "50年超越概率2%地震作用下房屋直接经济损失等级图", "3112f7d9-db91-4602-9d30-d51e1ef80d7a", "1209730e-2a4d-4dcf-9e2f-d209d8054a6c"),
    ECONOMIC_LOSS_LEVELMAP3("9-95-5", "100年超越概率1%地震作用下房屋直接经济损失等级图", "15ea0506-2c5e-4b50-a0db-c0bfba15a1f2", "1ef1ca48-3ed1-42ce-a72e-41ba1326b8ba"),

    DEATH_RISKEVALUATE_RISKLEVEL_MAP("9-96", "死亡人口风险评估图及风险等级图", "590cdc98-01ab-49c4-b324-3d4dd171bebe", "a180f7eb-c6e1-4e54-858a-281be0ec2098"),
    //fx_picture
    EQDST_DEATH_EVALUATEMAP("9-96-1", "地震灾害房屋破坏导致的死亡人口评估图", "8fd14b20-baed-4839-93a4-c255c31f7511", "4290ebb1-14da-43d9-ad8b-ca99b40fcfa6"),
    //fx_casualty_level_map
    DEATH_LEVELMAP0("9-96-2", "50年超越概率63%地震作用下房屋破坏致死人口等级图    ", "5c33794c-40a7-4f45-afca-263a6880edfb", "adeb4aac-907e-423e-a756-87bf3a8096bc"),
    DEATH_LEVELMAP1("9-96-3", "50年超越概率10%地震作用下房屋破坏致死人口等级图", "5acecd82-1613-47c9-bb62-4972880b44d2", "9f6a84d0-71cb-4eca-9b7c-a1fdc1a0e3e1"),
    DEATH_LEVELMAP2("9-96-4", "50年超越概率2%地震作用下房屋破坏致死人口等级图", "e45ac2f5-ef18-4e32-b276-4e8fe28d82b6", "22e2d3ac-f885-4440-88a7-ce39979df669"),
    DEATH_LEVELMAP3("9-96-5", "100年超越概率1%地震作用下房屋破坏致死人口等级图", "001bd1c4-c1c2-4617-a2ad-442595e6123a", "5d7e0684-512b-425a-bad6-3549c3ee9790");





    /**
     * 任务编码
     */
    private String taskCode;
    /**
     * 任务名称
     */
    private String taskName;
    /**
     * 质检id
     */
    private String qtId;
    /**
     * 上报id
     */
    private String rpId;

    TaskInfoEnum(String taskCode, String taskName, String qtId, String rpId) {
        this.taskCode = taskCode;
        this.taskName = taskName;
        this.qtId = qtId;
        this.rpId = rpId;
    }

    public String getTaskCode() {
        return this.taskCode;
    }
    public String getTaskName() {
        return this.taskName;
    }
    public String getQtId() {
        return this.qtId;
    }
    public String getRpId() {
        return this.rpId;
    }

    /**
     * 如果不重写toString方法，在调用枚举的时候，是输出的枚举名
     * 如 TaskInfoEnum.EQ_SURVEY，将输出EQ_SURVEY
     */
    @Override
    public String toString() {
        return "TaskInfoEnum [taskCode=" + this.taskCode + ", taskName=" + this.taskName +", qtId=" + this.qtId +", rpId=" + this.rpId + "]";
    }

    /**
     * 根据任务名称获取任务对象(枚举实例)
     * @param taskName
     * @return
     */
    public static TaskInfoEnum getInstanceByName(String taskName) {
        for (TaskInfoEnum task : TaskInfoEnum.values()) {
            if (task.getTaskName().equals(taskName)) {
                return task;
            }
        }
        return null;
    }

    public static TaskInfoEnum getInstanceByCode(String taskCode) {
        for (TaskInfoEnum task : TaskInfoEnum.values()) {
            if (task.getTaskCode().equals(taskCode)) {
                return task;
            }
        }
        return null;
    }
}
